<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * 定义应用的命令调度
     */
    protected function schedule(Schedule $schedule): void
    {
        // 每分钟执行一次定时记账任务
//        $schedule->command('money:auto-transaction')->everyMinute();

        // 每天凌晨0点执行检查会员到期用户的定时记账任务
//        $schedule->command('money:check-expired-membership-auto-transactions')->dailyAt('00:00');
    }

    /**
     * 注册命令
     */
    protected function commands(): void
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
